﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace SimpleSocket.Samples.ChatClient
{
    public partial class frmConnect : Form
    {

        public string UserName { get; set; }
        public string Host { get; set; }

        public frmConnect()
        {
            InitializeComponent();
        }

        private void btnConnect_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(txtUserName.Text))
            {
                MessageBox.Show("You must enter a username");
                return;
            }

            UserName = txtUserName.Text;
            Host = txtHostAddress.Text;
            this.DialogResult = System.Windows.Forms.DialogResult.OK;
        }

        private void btnExit_Click(object sender, EventArgs e)
        {
            Application.Exit();
        }
    }
}
